using System.Collections.Generic;
using System.Threading.Tasks;
using ERP.Common.Results;
using ERP.ERPSystem.WarehouseManagement.Dto;

namespace ERP.ERPSystem.WarehouseManagement
{
    /// <summary>
    /// 供应商退货服务接口
    /// </summary>
    public interface ISupplierReturnsServices
    {
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="query">查询条件</param>
        /// <returns>分页结果</returns>
        Task<APIResult<SupplierReturnsPagedResult>> GetPagedListAsync(SupplierReturnsQueryDto query);

        /// <summary>
        /// 根据ID获取详情
        /// </summary>
        /// <param name="id">主键Id</param>
        /// <returns>详情信息</returns>
        Task<APIResult<SupplierReturnsDto>> GetByIdAsync(int id);

        /// <summary>
        /// 创建供应商退货
        /// </summary>
        /// <param name="createDto">创建DTO</param>
        /// <returns>创建结果</returns>
        Task<APIResult<SupplierReturnsDto>> CreateAsync(SupplierReturnsCreateDto createDto);

        /// <summary>
        /// 更新供应商退货
        /// </summary>
        /// <param name="updateDto">更新DTO</param>
        /// <returns>更新结果</returns>
        Task<APIResult<SupplierReturnsDto>> UpdateAsync(SupplierReturnsUpdateDto updateDto);

        /// <summary>
        /// 删除供应商退货
        /// </summary>
        /// <param name="id">主键Id</param>
        /// <returns>删除结果</returns>
        Task<OperationResult> DeleteAsync(int id);

        /// <summary>
        /// 批量删除供应商退货
        /// </summary>
        /// <param name="ids">主键Id列表</param>
        /// <returns>删除结果</returns>
        Task<OperationResult> BatchDeleteAsync(List<int> ids);

        /// <summary>
        /// 获取供应商列表（用于选择）
        /// </summary>
        /// <param name="keyword">搜索关键词</param>
        /// <param name="pageNumber">页码</param>
        /// <param name="pageSize">每页大小</param>
        /// <returns>供应商列表</returns>
        Task<APIResult<SupplierPagedResult>> GetSuppliersAsync(string keyword = null, int pageNumber = 1, int pageSize = 10);

        /// <summary>
        /// 根据供应商编码获取供应商信息
        /// </summary>
        /// <param name="supplierCode">供应商编码</param>
        /// <returns>供应商信息</returns>
        Task<APIResult<SupplierSelectDto>> GetSupplierByCodeAsync(string supplierCode);

        /// <summary>
        /// 获取物料产品列表（用于供应商退货物料选择）
        /// </summary>
        /// <param name="keyword">搜索关键词</param>
        /// <param name="pageNumber">页码</param>
        /// <param name="pageSize">每页大小</param>
        /// <returns>物料产品列表</returns>
        Task<APIResult<MaterialProductPagedResult>> GetMaterialProductsAsync(string keyword = null, int pageNumber = 1, int pageSize = 10);
    }
} 